import http from "../common/utils/http.js";
const service = "/layer/v1/sys-service";
export default {
  // 获取验证码图片
  getCaptcha: (param) => http.get(`/layer/v1/auth-service/obtain/captcha`, param),
  // 用户登录
  userLogin: (param) => http.posts(`/layer/v1/auth-service/oauth/token`, param),
  // 获取菜单
  getMenu: (param) => http.get(`${service}/sys/acl/module/menu/currentUser/tree`, param),
  //获取字典列表
  getDictList: (param) => http.get(`${service}/sys/dict/data/query/list`, param),
  //获取配置主题色
  getThemeColor: (param) => http.get(`${service}/sys/config/query/sysSkinName`, param),
  //修改配置主题色
  modifyThemeColor: (param) => http.get(`${service}/sys/config/modify/sysSkinName`, param),

  /*********************个人信息***************************************************** */

  // 查询个人信息
  getPersonalInfo: (param) => http.get(`${service}/sys/user/query/user/info`, param),
  // 修改个人信息
  updateUser: (param) => http.post(`${service}/sys/user/modify/userInfo`, param),
  // 个人中心-更改密码
  updatePassword: (param) => http.post(`${service}/sys/user/modify/password`, param),
  // 公共文件上传
  uploadFile: (param) => http.post(`${service}/com/upload`, param),

  /*********************钉一下***************************************************** */
  //添加常用菜单
  addCommonMenu: (param) => http.get(`${service}/sys/common/save`, param),
  //查询常用菜单
  getCommonMenu: (param) => http.get(`${service}/sys/common/menu`, param),
  //删除常用菜单
  deleteCommonMenu: (param) => http.get(`${service}/sys/common/remove`, param)
};
